/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 * Description: nonuniform bruck 算法基类实现文件
 */

#include "nonuniform_bruck_base.h"

namespace hccl {


NBBase::NBBase(const HcclDispatcher dispatcher)
    : AlgTemplateBase(dispatcher)
{
}

NBBase::~NBBase()
{
}

u32 NBBase::CalcCeilLog2(const u32 num)
{
    u32 ans = 0;
    for (u32 tmp = num - 1; tmp != 0; tmp >>= 1, ++ans) {}
    return ans;
}


}   // ~~ namespace hccl
